home *** CD-ROM | disk | FTP | other *** search
/ Tech Arsenal 1 / Tech Arsenal (Arsenal Computer).ISO / tek-01 / pdcurs21.zip / PORTABLE.ZIP / NODELAY.C < prev    next >
Text File  |  1992-11-21  |  1KB  |  44 lines

  1. #define        CURSES_LIBRARY  1
  2. #include <curses.h>
  3. #undef nodelay
  4.  
  5. #ifndef        NDEBUG
  6. char *rcsid_nodelay = "$Header: c:/curses/portable/RCS/nodelay.c%v 2.0 1992/11/15 03:29:05 MH Rel $";
  7. #endif
  8.  
  9.  
  10.  
  11.  
  12. /*man-start*********************************************************************
  13.  
  14.   nodelay()    - disable block during read
  15.  
  16.   X/Open Description:
  17.        This function controls whether wgetch() is a non-blocking
  18.        call. If the option is enabled, and no input is ready, wgetch()
  19.        will return ERR. If disabled, wgetch() will hang until input
  20.        is ready.
  21.  
  22.   PDCurses Description:
  23.        There is no additional PDCurses functionality for this function.
  24.  
  25.   X/Open Return Value:
  26.        This function returns OK on success and ERR on error.
  27.  
  28.   X/Open Errors:
  29.        No errors are defined for this function.
  30.  
  31.   Portability:
  32.        PDCurses        int nodelay( WINDOW* win, bool bf );
  33.        X/Open Dec '88  int nodelay( WINDOW* win, bool bf );
  34.        BSD Curses      int nodelay( WINDOW* win, bool bf );
  35.        SYS V Curses    int nodelay( WINDOW* win, bool bf );
  36.  
  37. **man-end**********************************************************************/
  38.  
  39. int    nodelay( WINDOW *win, bool flag )
  40. {
  41.        win->_nodelay = flag;
  42.        return( OK );
  43. }
  44.